package edu.udo.sopra10.chaturaji.entities.coordinates;

import edu.udo.sopra10.chaturaji.util.Clonable;

/**
 * A coordinate is a pair of spatial coordinates, a x- and a y-coordinate.
 * 
 * @author Simon Dierl
 */
public interface Coordinate extends Clonable {

	/**
	 * Get the x-coordinate.
	 * 
	 * @return the x-coordinate.
	 */
	public abstract byte getX();

	/**
	 * Get the y-coordinate.
	 * 
	 * @return the y-coordinate.
	 */
	public abstract byte getY();

	/**
	 * Set the x-coordinate.
	 * 
	 * @param x
	 *            the new x-coordinate.
	 */
	public abstract void setX(byte x);

	/**
	 * Set both x- and y-coordinate.
	 * 
	 * @param x
	 *            the new x-coordinate.
	 * @param y
	 *            the new y-coordinate.
	 */
	public abstract void setXY(byte x, byte y);

	/**
	 * Set the y-coordinate.
	 * 
	 * @param y
	 *            the new y-coordinate.
	 */
	public abstract void setY(byte y);

	/**
	 * Move the position by the value of another position.
	 * 
	 * @param position
	 *            the position to add to this position's coordinates.
	 */
	public abstract void shift(Coordinate position);

	/**
	 * Alter the x-coordinate by a given value.
	 * 
	 * @param x
	 *            the value to add to the x-coordinate.
	 * @return the new x-coordinate.
	 */
	public abstract byte shiftX(byte x);

	/**
	 * Alter the x- and y-coordinates by given values.
	 * 
	 * @param x
	 *            the value to add to the x-coordinate.
	 * @param y
	 *            the value to add to the y-coordinate.
	 */
	public abstract void shiftXY(byte x, byte y);

	/**
	 * Alter the y-coordinate by a given value.
	 * 
	 * @param y
	 *            the value to add to the y-coordinate.
	 * @return the new y-coordinate.
	 */
	public abstract byte shiftY(byte y);
}